package com.xielx.ohs.web;

import java.util.HashMap;
import java.util.Map;



public abstract class BaseController
{
  protected Map<String, Object> success(Object data)
  {
    Map<String, Object> map = new HashMap();
    map.put("code", Integer.valueOf(200));
    map.put("data", data);
    return map;
  }

  protected Map<String, Object> fail(int code, String msg) {
    Map<String, Object> map = new HashMap();
    map.put("code", Integer.valueOf(code));
    map.put("msg", msg);
    return map;
  }
}